#pragma once

#include "Containers/Vector.h"
#include "DecoratedType.h"
#include "TypeID.h"

//restore the generic type info
class CGenericInfo
{
public:    
    TVector<CType*> PlaceholderTypes;

    TVector<CType*> GeneralizedTypes;

    TMap<
         TVector<CType*> /* argument types */ 
        ,CType* /* generalized type */ 
    > 
    GenericMap;

    virtual void AddGeneralizedType(
        const TVector<CType*>& Arguments, CType* InType)
    {
        GenericMap.Add(Arguments, InType);
    }

};

//restore the generlizecd info
class CGeneralizedInfo
{
public:
    CType* TemplateType;

    //the type replace the placeholder type
    TVector<CType*> TypeArguments;


};

// class CGenericInfo: public CGenericInfo
// {
// public:
//     TMap<SDecoratedType /* Element Type */ ,CType* /* generalized type */ > GenericMap;

//     virtual void AddGeneralizedType(
//         const TVector<SDecoratedType>& Arguments, CType* InType) override
//     {
//         assert(Arguments.Num() == 1);
//         GenericMap.Add(Arguments[0], InType);
//     }
// };

// class CGenericInfo: public CGenericInfo
// {
// public:
//     TMap<
//          TTuple<SDecoratedType /* key Type */,SDecoratedType /* value type*/ > 
//         ,CType* /* generalized type */ 
//     > 
//     GenericMap;

//     virtual void AddGeneralizedType(
//         const TVector<SDecoratedType>& Arguments, CType* InType) override
//     {
//         assert(Arguments.Num() == 2);
//         GenericMap.Add(TTuple<SDecoratedType,SDecoratedType>(Arguments[0],Arguments[1]), InType);
//     }
// };

// class CGenericInfo: public CGenericInfo
// {
// public:
//     TMap<
//          TVector<SDecoratedType> /* argument types */ 
//         ,CType* /* generalized type */ 
//     > 
//     GenericMap;

//     virtual void AddGeneralizedType(
//         const TVector<SDecoratedType>& Arguments, CType* InType) override
//     {
//         GenericMap.Add(Arguments, InType);
//     }
// };